<template>
    <el-container style="min-height: 100vh">
      <el-aside :width="sideWidth+'px'" style="background-color: rgb(238, 241, 246);box-shadow: 2px 0 6px #fff">
          <Aside/>
      </el-aside>

      <el-container>
        <el-header style="border-bottom: 1px solid #ccc">
          <MyHeader :collapse-btn-class="collapseBtnClass" :collapse="isCollapse" />
        </el-header>
        <el-main>
          <!--表示当前页面的子路由会在这里展示-->
          <router-view />
        </el-main>

      </el-container>
    </el-container>
</template>

<script>
import Aside from '@/components/Aside.vue'
import MyHeader from "@/components/MyHeader";
import Bus from '../Bus.js'
import {Base64} from '../utils/base64'
export default {
  name: 'HomeView',
  components:{
    Aside,MyHeader
  },
  data(){
    return {
      collapseBtnClass:'el-icon-s-fold',
      isCollapse:false,
      sideWidth:200,
      user:{}
    }
  },
  methods:{
    async load(){
      this.user=JSON.parse(sessionStorage.getItem('user'))
     
      
    }
    // 页面挂载去本地浏览器取id，取不到则跳转登录界面，取到则发请求给后端获取用户信息
    
  },
  mounted(){
    Bus.$on('sideWidth',(data)=>{
      this.sideWidth=data
    })
  },
}
</script>

<style scoped>

</style>